package com.abbas.CayTcore.adapter

import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.abbas.CayTcore.databinding.ProductListItemBinding
import com.abbas.CayTcore.entity.vo.ScheduleVO

class NowProductAdapter : BaseAdapter<NowProductAdapter.NowProductViewHolder,ScheduleVO,ProductListItemBinding>(
    mutableListOf(),) {

    inner class NowProductViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {}

    override fun onBindViewHolder(holder: NowProductViewHolder, position: Int) {
        viewBinding.coreName.text = data[position].product
        viewBinding.targetQuantity.text = data[position].quantity.toString()
        //差个订单号，之后在考虑怎么搞
        //viewBinding.orderId.text = data[position].
    }

    override fun initViewHolder(view: View): NowProductViewHolder {
        return NowProductViewHolder(view)
    }

    override fun getViewBinding(parent: ViewGroup, viewType: Int): ProductListItemBinding {
        return ProductListItemBinding.inflate(LayoutInflater.from(parent.context), parent, false)
    }


}